package com.github.yeecode.mybatisdemo.xml;

import org.apache.ibatis.parsing.XNode;
import org.apache.ibatis.parsing.XPathParser;
import org.w3c.dom.Node;

import java.util.List;
import java.util.Map;
import java.util.Properties;

/**
 * @author : wushikai
 * <p>
 * date : 2021-02-09
 */
public class MyXNode extends XNode {



    public MyXNode(XPathParser xpathParser, Node node, Properties variables) {
        super(xpathParser, node, variables);


    }




    @Override
    public String toString(){

      /*  StringBuilder builder = new StringBuilder();
        builder.append("<");
        builder.append(super.getName());
        for (Map.Entry<Object, Object> entry : attributes.entrySet()) {
            builder.append(" ");
            builder.append(entry.getKey());
            builder.append("=\"");
            builder.append(entry.getValue());
            builder.append("\"");
        }
        List<XNode> children = getChildren();
        if (!children.isEmpty()) {
            builder.append(">\n");
            for (XNode node : children) {
                builder.append(node.toString());
            }
            builder.append("</");
            builder.append(name);
            builder.append(">");
        } else if (body != null) {
            builder.append(">");
            builder.append(body);
            builder.append("</");
            builder.append(name);
            builder.append(">");
        } else {
            builder.append("/>");
        }
        builder.append("\n");
        return builder.toString();*/

      return null;

    }


}
